package com.slz3.business.module.socialManagement.socShow.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.socialManagement.socShow.domain.SocShow;
import com.slz3.business.module.socialManagement.socShow.domain.SocShowCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class SocShowResController {

    static Mono<ServerResponse> add(ServerRequest req, SocShow socShow) {
        if (SocShowResUnsafeValid.add(req, socShow)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return SocShowResAtomic.add_$SocShowUpdateLock(req, socShow);
        }
    }

    static final Mono<ServerResponse> delete(ServerRequest req, SocShowCondition socShowCondition) {
        if (SocShowResUnsafeValid.delete(req, socShowCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return SocShowResAtomic.delete_$SocShowUpdateLock(req, socShowCondition);
        }
    }

    static Mono<ServerResponse> modify(ServerRequest req, SocShow socShow) {
        if (SocShowResUnsafeValid.modify(req, socShow)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return SocShowResAtomic.modify_$SocShowUpdateLock(req, socShow);
        }
    }

    static Mono<ServerResponse> list(ServerRequest req) {
        if (SocShowResUnsafeValid.list(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return SocShowResExecutor.list(req);
        }
    }

    static Mono<ServerResponse> info(ServerRequest req) {
        if (SocShowResUnsafeValid.info(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return SocShowResAtomic.info_$SocShowUpdateLock(req);
        }
    }

    static Mono<ServerResponse> choice(ServerRequest req) {
        if (SocShowResUnsafeValid.choice(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return SocShowResExecutor.choice(req);
        }
    }

    static final Mono<ServerResponse> auditSubmit(ServerRequest req, SocShowCondition socShowCondition) {
        //
        if (SocShowResUnsafeValid.auditSubmit(req, socShowCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return SocShowResAtomic.auditSubmit_$SocShowUpdateLock(req, socShowCondition);
        }
    }

    static final Mono<ServerResponse> audit(ServerRequest req, SocShowCondition socShowCondition) {
        if (SocShowResUnsafeValid.audit(req, socShowCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return SocShowResAtomic.audit_$SocShowUpdateLock(req, socShowCondition);
        }
    }

    static final Mono<ServerResponse> auditReject(ServerRequest req, SocShowCondition socShowCondition) {
        if (SocShowResUnsafeValid.auditReject(req, socShowCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return SocShowResAtomic.auditReject_$SocShowUpdateLock(req, socShowCondition);
        }
    }

    static final Mono<ServerResponse> usingEnable(ServerRequest req, SocShowCondition socShowCondition) {
        if (SocShowResUnsafeValid.usingEnable(req, socShowCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return SocShowResAtomic.usingEnable_$SocShowUpdateLock(req, socShowCondition);
        }
    }

    static final Mono<ServerResponse> usingDisable(ServerRequest req, SocShowCondition socShowCondition) {
        if (SocShowResUnsafeValid.usingDisable(req, socShowCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return SocShowResAtomic.usingDisable_$SocShowUpdateLock(req, socShowCondition);
        }
    }

}
